package com.example.smartcitydemo.receiver

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.example.smartcitydemo.ActivityManager

import com.example.smartcitydemo.ui.LoginActivity

/**
 * @PACKAGE_NAME: com.example.smartcitydemo.receiver
 * @NAME: Caleb.F
 * @DATE: 2021/11/8 18:48
 * @Email: 1919796283@qq.com
 * 广播接收器中处理token过期的问题
 */
class LoginBroadCastReceiver:BroadcastReceiver() {
    companion object {
        const val LOGIN_RECEIVER_ACTION =
            "com.example.smartcity_jscs.BroadCastReceiver.LOGIN_RECEIVER"
    }

    override fun onReceive(context: Context, intent: Intent?) {
        ActivityManager.finishAll()
        LoginActivity.jumpToLogin(context)
    }
}